<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  
  
  <title>SPFA算法详解 | Hexo</title>
  <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
  <meta name="description" content="它死了">
<meta property="og:type" content="article">
<meta property="og:title" content="SPFA算法详解">
<meta property="og:url" content="http://example.com/2020/08/06/SPFA%E7%AE%97%E6%B3%95%E8%AF%A6%E8%A7%A3/index.html">
<meta property="og:site_name" content="Hexo">
<meta property="og:description" content="它死了">
<meta property="og:locale" content="en_US">
<meta property="og:image" content="https://cdn.luogu.com.cn/upload/image_hosting/jue0l9zu.png">
<meta property="og:image" content="https://cdn.luogu.com.cn/upload/image_hosting/q325notz.png">
<meta property="og:image" content="https://cdn.luogu.com.cn/upload/image_hosting/np62yi7e.png">
<meta property="article:published_time" content="2020-08-06T06:44:44.167Z">
<meta property="article:modified_time" content="2023-07-19T11:51:25.491Z">
<meta property="article:author" content="John Doe">
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="https://cdn.luogu.com.cn/upload/image_hosting/jue0l9zu.png">
  
    <link rel="alternate" href="/atom.xml" title="Hexo" type="application/atom+xml">
  
  
    <link rel="shortcut icon" href="/favicon.png">
  
  
    
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/typeface-source-code-pro@0.0.71/index.min.css">

  
  
<link rel="stylesheet" href="/css/style.css">

  
    
<link rel="stylesheet" href="/fancybox/jquery.fancybox.min.css">

  
  
<meta name="generator" content="Hexo 6.3.0"></head>

<body>
  <div id="container">
    <div id="wrap">
      <header id="header">
  <div id="banner"></div>
  <div id="header-outer" class="outer">
    <div id="header-title" class="inner">
      <h1 id="logo-wrap">
        <a href="/" id="logo">Hexo</a>
      </h1>
      
    </div>
    <div id="header-inner" class="inner">
      <nav id="main-nav">
        <a id="main-nav-toggle" class="nav-icon"><span class="fa fa-bars"></span></a>
        
          <a class="main-nav-link" href="/">Home</a>
        
          <a class="main-nav-link" href="/archives">Archives</a>
        
      </nav>
      <nav id="sub-nav">
        
        
          <a class="nav-icon" href="/atom.xml" title="RSS Feed"><span class="fa fa-rss"></span></a>
        
        <a class="nav-icon nav-search-btn" title="Search"><span class="fa fa-search"></span></a>
      </nav>
      <div id="search-form-wrap">
        <form action="//google.com/search" method="get" accept-charset="UTF-8" class="search-form"><input type="search" name="q" class="search-form-input" placeholder="Search"><button type="submit" class="search-form-submit">&#xF002;</button><input type="hidden" name="sitesearch" value="http://example.com"></form>
      </div>
    </div>
  </div>
</header>

      <div class="outer">
        <section id="main"><article id="post-SPFA算法详解" class="h-entry article article-type-post" itemprop="blogPost" itemscope itemtype="https://schema.org/BlogPosting">
  <div class="article-meta">
    <a href="/2020/08/06/SPFA%E7%AE%97%E6%B3%95%E8%AF%A6%E8%A7%A3/" class="article-date">
  <time class="dt-published" datetime="2020-08-06T06:44:44.167Z" itemprop="datePublished">2020-08-06</time>
</a>
    
  </div>
  <div class="article-inner">
    
    
      <header class="article-header">
        
  
    <h1 class="p-name article-title" itemprop="headline name">
      SPFA算法详解
    </h1>
  

      </header>
    
    <div class="e-content article-entry" itemprop="articleBody">
      
        <p>它死了</p>
<p>前置知识：<a target="_blank" rel="noopener" href="https://www.luogu.com.cn/blog/ztx666-blog/p3371-dan-yuan-zui-duan-lu-jing-bellman-ford-suan-fa">Bellman-Ford算法</a></p>
<p>前排提示：SPFA算法非常容易被卡出翔。所以如果不是图中有负权边，尽量使用Dijkstra！（Dijkstra算法不能能处理负权边，但SPFA能）</p>
<p>前排提示*2：一定要先学Bellman-Ford！</p>
<h1 id="0-引子"><a href="#0-引子" class="headerlink" title="0.引子"></a>0.引子</h1><p>在Bellman-Ford算法中，每条边都要松弛$n-1$轮，还不一定能松弛成功，这实在是太浪费了。能不能想办法改进呢？</p>
<p>非常幸运，SPFA算法能做到这点。（SPFA又名“Bellman-Ford的队列优化”，就是这个原因。）</p>
<h1 id="1-基本思想"><a href="#1-基本思想" class="headerlink" title="1.基本思想"></a>1.基本思想</h1><p>先说一个结论：只有一个点在上一轮被松弛成功时，这一轮从这个点连出的点才有可能被成功松弛。</p>
<p>为什么？<del>显而易见</del></p>
<p><del>好吧其实我当初也花了不少时间理解这玩意</del></p>
<p>松弛的本质其实是通过一个点中转来缩短距离（如果你看了前置很容易理解）。<strong>所以，如果起点到一个点的距离因为某种原因变小了，从起点到这个距离变小的点连出的点的距离也有可能变小（因为可以通过变小的点中转）。</strong>（通读三遍再往下看）</p>
<p>所以，可以在下一轮只用这一轮松弛成功的点进行松弛，这就是SPFA的基本思想。</p>
<h1 id="2-用队列实现"><a href="#2-用队列实现" class="headerlink" title="2.用队列实现"></a>2.用队列实现</h1><p>我们知道了在下一轮只用这一轮松弛成功的点进行松弛，就可以把这一轮松弛成功的点放进队列里，下一轮只用从队列里取出的点进行松弛。</p>
<p>为什么是队列而不是其他的<del>玄学</del>数据结构？因为队列具有“先进先出，后进后出”的特点，可以保证这一轮松弛的点不会在这一轮结束之前取出。</p>
<p>干说可能不太理解，所以还是举个栗子吧。</p>
<p><img src="https://cdn.luogu.com.cn/upload/image_hosting/jue0l9zu.png" alt=""></p>
<p>这又是之前的有向图，但是这次我们要用SPFA跑。</p>
<p>最开始，我们要把$1$号点放进队列（为什么要这样？先往下看）。$dis$数组和队列是这个亚子的：</p>
<div class="table-container">
<table>
<thead>
<tr>
<th style="text-align:right">$i$</th>
<th style="text-align:right">$dis[i]$</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:right">$1$</td>
<td style="text-align:right">$0$</td>
</tr>
<tr>
<td style="text-align:right">$2$</td>
<td style="text-align:right">$\infty$</td>
</tr>
<tr>
<td style="text-align:right">$3$</td>
<td style="text-align:right">$\infty$</td>
</tr>
<tr>
<td style="text-align:right">$4$</td>
<td style="text-align:right">$\infty$</td>
</tr>
</tbody>
</table>
</div>
<div class="table-container">
<table>
<thead>
<tr>
<th style="text-align:right">queue</th>
<th style="text-align:right">1</th>
<th style="text-align:right"></th>
<th style="text-align:right"></th>
<th style="text-align:right"></th>
<th style="text-align:right"></th>
<th style="text-align:right"></th>
<th style="text-align:right"></th>
<th style="text-align:right"></th>
<th style="text-align:right"></th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:right"></td>
</tr>
</tbody>
</table>
</div>
<p>用$1$号点进行松弛（就是$1$号到$1$号再到目标点）：</p>
<div class="table-container">
<table>
<thead>
<tr>
<th style="text-align:right">$i$</th>
<th style="text-align:right">$dis[i]$</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:right">$1$</td>
<td style="text-align:right">$0$</td>
</tr>
<tr>
<td style="text-align:right">$2$</td>
<td style="text-align:right">$1$</td>
</tr>
<tr>
<td style="text-align:right">$3$</td>
<td style="text-align:right">$5$</td>
</tr>
<tr>
<td style="text-align:right">$4$</td>
<td style="text-align:right">$\infty$</td>
</tr>
</tbody>
</table>
</div>
<div class="table-container">
<table>
<thead>
<tr>
<th style="text-align:right">queue</th>
<th style="text-align:right">2</th>
<th style="text-align:right">3</th>
<th style="text-align:right"></th>
<th style="text-align:right"></th>
<th style="text-align:right"></th>
<th style="text-align:right"></th>
<th style="text-align:right"></th>
<th style="text-align:right"></th>
<th style="text-align:right"></th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:right"></td>
</tr>
</tbody>
</table>
</div>
<p>$2,3$号点被松弛成功了，把它们加入到队列里。</p>
<p>$1$号点被用过了，把它扔掉。<del>（工具点石锤）</del></p>
<p>用$2$号点进行松弛：</p>
<div class="table-container">
<table>
<thead>
<tr>
<th style="text-align:right">$i$</th>
<th style="text-align:right">$dis[i]$</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:right">$1$</td>
<td style="text-align:right">$0$</td>
</tr>
<tr>
<td style="text-align:right">$2$</td>
<td style="text-align:right">$1$</td>
</tr>
<tr>
<td style="text-align:right">$3$</td>
<td style="text-align:right">$5$</td>
</tr>
<tr>
<td style="text-align:right">$4$</td>
<td style="text-align:right">$3$</td>
</tr>
</tbody>
</table>
</div>
<div class="table-container">
<table>
<thead>
<tr>
<th style="text-align:right">queue</th>
<th style="text-align:right">3</th>
<th style="text-align:right">4</th>
<th style="text-align:right"></th>
<th style="text-align:right"></th>
<th style="text-align:right"></th>
<th style="text-align:right"></th>
<th style="text-align:right"></th>
<th style="text-align:right"></th>
<th style="text-align:right"></th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:right"></td>
</tr>
</tbody>
</table>
</div>
<p>$4$号点被松弛成功了，把它们加入到队列里。</p>
<p>$2$号点被用过了，把它扔掉。</p>
<p>用$3$号点进行松弛：</p>
<div class="table-container">
<table>
<thead>
<tr>
<th style="text-align:right">$i$</th>
<th style="text-align:right">$dis[i]$</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:right">$1$</td>
<td style="text-align:right">$0$</td>
</tr>
<tr>
<td style="text-align:right">$2$</td>
<td style="text-align:right">$1$</td>
</tr>
<tr>
<td style="text-align:right">$3$</td>
<td style="text-align:right">$5$</td>
</tr>
<tr>
<td style="text-align:right">$4$</td>
<td style="text-align:right">$3$</td>
</tr>
</tbody>
</table>
</div>
<div class="table-container">
<table>
<thead>
<tr>
<th style="text-align:right">queue</th>
<th style="text-align:right">4</th>
<th style="text-align:right"></th>
<th style="text-align:right"></th>
<th style="text-align:right"></th>
<th style="text-align:right"></th>
<th style="text-align:right"></th>
<th style="text-align:right"></th>
<th style="text-align:right"></th>
<th style="text-align:right"></th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:right"></td>
</tr>
</tbody>
</table>
</div>
<p>没有点被松弛成功。</p>
<p>$3$号点被用过了，把它扔掉。</p>
<p>用$4$号点进行松弛：</p>
<div class="table-container">
<table>
<thead>
<tr>
<th style="text-align:right">$i$</th>
<th style="text-align:right">$dis[i]$</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:right">$1$</td>
<td style="text-align:right">$0$</td>
</tr>
<tr>
<td style="text-align:right">$2$</td>
<td style="text-align:right">$1$</td>
</tr>
<tr>
<td style="text-align:right">$3$</td>
<td style="text-align:right">$4$</td>
</tr>
<tr>
<td style="text-align:right">$4$</td>
<td style="text-align:right">$3$</td>
</tr>
</tbody>
</table>
</div>
<div class="table-container">
<table>
<thead>
<tr>
<th style="text-align:right">queue</th>
<th style="text-align:right">3</th>
<th style="text-align:right"></th>
<th style="text-align:right"></th>
<th style="text-align:right"></th>
<th style="text-align:right"></th>
<th style="text-align:right"></th>
<th style="text-align:right"></th>
<th style="text-align:right"></th>
<th style="text-align:right"></th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:right"></td>
</tr>
</tbody>
</table>
</div>
<p>$3$号点被松弛成功了，把它们加入到队列里。</p>
<p>$4$号点被用过了，把它扔掉。</p>
<p>用$3$号点进行松弛：</p>
<div class="table-container">
<table>
<thead>
<tr>
<th style="text-align:right">$i$</th>
<th style="text-align:right">$dis[i]$</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:right">$1$</td>
<td style="text-align:right">$0$</td>
</tr>
<tr>
<td style="text-align:right">$2$</td>
<td style="text-align:right">$1$</td>
</tr>
<tr>
<td style="text-align:right">$3$</td>
<td style="text-align:right">$4$</td>
</tr>
<tr>
<td style="text-align:right">$4$</td>
<td style="text-align:right">$3$</td>
</tr>
</tbody>
</table>
</div>
<div class="table-container">
<table>
<thead>
<tr>
<th style="text-align:right">queue</th>
<th style="text-align:right"></th>
<th style="text-align:right"></th>
<th style="text-align:right"></th>
<th style="text-align:right"></th>
<th style="text-align:right"></th>
<th style="text-align:right"></th>
<th style="text-align:right"></th>
<th style="text-align:right"></th>
<th style="text-align:right"></th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:right"></td>
</tr>
</tbody>
</table>
</div>
<p>没有点被松弛成功。</p>
<p>$3$号点被用过了，把它扔掉。</p>
<p>现在队列为空（也就是能松弛的都松弛了），算法结束。</p>
<h1 id="3-Code"><a href="#3-Code" class="headerlink" title="3.Code"></a>3.Code</h1><p>SPFA的具体实现，推荐结合上面的栗子食用。</p>
<figure class="highlight cpp"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta">#<span class="keyword">include</span> <span class="string">&lt;bits/stdc++.h&gt;</span></span></span><br><span class="line"><span class="keyword">using</span> <span class="keyword">namespace</span> std;</span><br><span class="line"><span class="meta">#<span class="keyword">define</span> MAXN 10005</span></span><br><span class="line"><span class="meta">#<span class="keyword">define</span> INF 0x7fffffff</span></span><br><span class="line"><span class="type">int</span> n,m,s,dis[MAXN];</span><br><span class="line">vector&lt;pair&lt;<span class="type">int</span>,<span class="type">int</span>&gt; &gt; g[MAXN];<span class="comment">//用vector存图，但是据说链式前向星更快</span></span><br><span class="line"><span class="function"><span class="type">void</span> <span class="title">spfa</span><span class="params">()</span></span>&#123;</span><br><span class="line">    queue&lt;<span class="type">int</span>&gt; q;</span><br><span class="line">    q.<span class="built_in">push</span>(s);<span class="comment">//把初始点加入队列</span></span><br><span class="line">    <span class="built_in">fill</span>(dis+<span class="number">1</span>,dis+<span class="number">1</span>+n,INF);<span class="comment">//因为一开始所有点都到不了，所以初始化为INF</span></span><br><span class="line">    dis[s]=<span class="number">0</span>;<span class="comment">//自己到自己肯定距离为0</span></span><br><span class="line">    <span class="keyword">while</span>(!q.<span class="built_in">empty</span>())&#123;</span><br><span class="line">        <span class="type">int</span> u=q.<span class="built_in">front</span>();</span><br><span class="line">        q.<span class="built_in">pop</span>();<span class="comment">//从队列里取出第一个元素</span></span><br><span class="line">        <span class="keyword">for</span>(<span class="type">int</span> i=<span class="number">0</span>;i&lt;g[u].<span class="built_in">size</span>();i++)&#123;</span><br><span class="line">            <span class="type">int</span> v=g[u][i].first,w=g[u][i].second;</span><br><span class="line">            <span class="keyword">if</span>(dis[v]&gt;dis[u]+w)&#123;</span><br><span class="line">                dis[v]=dis[u]+w;</span><br><span class="line">                q.<span class="built_in">push</span>(v);</span><br><span class="line">            &#125;</span><br><span class="line">            <span class="comment">//如果能松弛成功，那么松弛，把松弛成功的目标点放入队列</span></span><br><span class="line">        &#125;</span><br><span class="line">    &#125;</span><br><span class="line">&#125;</span><br><span class="line"><span class="function"><span class="type">int</span> <span class="title">main</span><span class="params">()</span></span>&#123;</span><br><span class="line">    <span class="built_in">scanf</span>(<span class="string">&quot;%d%d%d&quot;</span>,&amp;n,&amp;m,&amp;s);</span><br><span class="line">    <span class="keyword">for</span>(<span class="type">int</span> i=<span class="number">1</span>;i&lt;=m;i++)&#123;</span><br><span class="line">        <span class="type">int</span> u,v,w;</span><br><span class="line">        <span class="built_in">scanf</span>(<span class="string">&quot;%d%d%d&quot;</span>,&amp;u,&amp;v,&amp;w);</span><br><span class="line">        g[u].<span class="built_in">push_back</span>(<span class="built_in">make_pair</span>(v,w));</span><br><span class="line">    &#125;<span class="comment">//输入，建图</span></span><br><span class="line">    <span class="built_in">spfa</span>();</span><br><span class="line">    <span class="keyword">for</span>(<span class="type">int</span> i=<span class="number">1</span>;i&lt;=n;i++)&#123;</span><br><span class="line">        <span class="built_in">printf</span>(<span class="string">&quot;%d &quot;</span>,dis[i]);</span><br><span class="line">    &#125;<span class="comment">//输出</span></span><br><span class="line">    <span class="keyword">return</span> <span class="number">0</span>;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p>这个代码能够AC<a target="_blank" rel="noopener" href="https://www.luogu.com.cn/problem/P3371">P3371</a>，但是我还是推荐你自己码一遍。</p>
<h1 id="4-特点"><a href="#4-特点" class="headerlink" title="4.特点"></a>4.特点</h1><ul>
<li>能够处理有负权边的图，但是隔壁Dijkstra不行。</li>
<li>在有负环的情况下，不存在最短路，因为不停在负环上绕就能把最短路刷到任意低。但是SPFA能够判断图中是否存在负环，具体方法为统计每个点的入队次数，如果有一个点入队次数$ \ge n $，那么图上存在负环，也就不存在最短路了。</li>
<li>什么？你不知道什么叫负环？下面的就是。</li>
</ul>
<p><img src="https://cdn.luogu.com.cn/upload/image_hosting/q325notz.png" alt=""></p>
<blockquote>
<p>就是一个环，边权和是负。一般用一个名为菜鸡算法的算法判断</p>
<p>——Ynoi</p>
</blockquote>
<ul>
<li><strong>SPFA的时间复杂度是$O(km)$，$k$是每一个节点的平均入队次数，经过实践，$k$一般为$4$，所以SPFA通常情况下非常高效。但是SPFA非常容易被卡出翔，最坏情况下会变成$O(nm)$！</strong> 所以如果能用Dijkstra尽量不要用SPFA。至于具体怎么卡，据说是这样的：</li>
</ul>
<p><img src="https://cdn.luogu.com.cn/upload/image_hosting/np62yi7e.png" alt=""></p>
<p>（这种图据说叫菊花图，能欺骗SPFA多次让点进入队列，所以$k$会变得非常大（上限为$n$）。）</p>

      
    </div>
    <footer class="article-footer">
      <a data-url="http://example.com/2020/08/06/SPFA%E7%AE%97%E6%B3%95%E8%AF%A6%E8%A7%A3/" data-id="clk9o8ln200048wi539h9441y" data-title="SPFA算法详解" class="article-share-link"><span class="fa fa-share">Share</span></a>
      
      
      
    </footer>
  </div>
  
    
<nav id="article-nav">
  
    <a href="/2020/08/24/%E9%A2%98%E8%A7%A3%20P2426%20%E3%80%90%E5%88%A0%E6%95%B0%E3%80%91/" id="article-nav-newer" class="article-nav-link-wrap">
      <strong class="article-nav-caption">Newer</strong>
      <div class="article-nav-title">
        
          题解 P2426 【删数】
        
      </div>
    </a>
  
  
    <a href="/2020/08/06/%E7%8A%B6%E6%80%81%E5%8E%8B%E7%BC%A9%E5%8A%A8%E6%80%81%E8%A7%84%E5%88%92(%E7%8A%B6%E5%8E%8BDP)%E8%AF%A6%E8%A7%A3/" id="article-nav-older" class="article-nav-link-wrap">
      <strong class="article-nav-caption">Older</strong>
      <div class="article-nav-title">状态压缩动态规划(状压DP)详解</div>
    </a>
  
</nav>

  
</article>


</section>
        
          <aside id="sidebar">
  
    

  
    

  
    
  
    
  <div class="widget-wrap">
    <h3 class="widget-title">Archives</h3>
    <div class="widget">
      <ul class="archive-list"><li class="archive-list-item"><a class="archive-list-link" href="/archives/2023/07/">July 2023</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2022/10/">October 2022</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2022/05/">May 2022</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2022/02/">February 2022</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2022/01/">January 2022</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2021/08/">August 2021</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2021/07/">July 2021</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2021/06/">June 2021</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2020/08/">August 2020</a></li></ul>
    </div>
  </div>


  
    
  <div class="widget-wrap">
    <h3 class="widget-title">Recent Posts</h3>
    <div class="widget">
      <ul>
        
          <li>
            <a href="/2023/07/17/%E5%86%B3%E7%AD%96%E5%8D%95%E8%B0%83%E6%80%A7%E4%BC%98%E5%8C%96DP%20%E5%AD%A6%E4%B9%A0%E7%AC%94%E8%AE%B0%20AND%20P4767%20%E3%80%8CIOI2000%E3%80%8D%20%E9%82%AE%E5%B1%80%20%E9%A2%98%E8%A7%A3/">决策单调性优化DP 学习笔记 AND P4767 「IOI2000」 邮局 题解</a>
          </li>
        
          <li>
            <a href="/2022/10/30/CSP-S%202022%20%E6%B8%B8%E8%AE%B0/">CSP-S 2022 游记</a>
          </li>
        
          <li>
            <a href="/2022/05/29/%E6%96%9C%E7%8E%87%E4%BC%98%E5%8C%96%E5%8A%A8%E6%80%81%E8%A7%84%E5%88%92%20%E5%AD%A6%E4%B9%A0%E7%AC%94%E8%AE%B0/">斜率优化动态规划 学习笔记</a>
          </li>
        
          <li>
            <a href="/2022/05/22/PKUSC%E4%B8%80%E5%8F%A5%E8%AF%9D%E6%B8%B8%E8%AE%B0/">PKUSC一句话游记</a>
          </li>
        
          <li>
            <a href="/2022/05/18/%E7%9C%81%E9%80%89%E6%B8%B8%E8%AE%B0%EF%BC%9F%E7%9C%81%E9%80%89%E6%B8%B8%E5%AF%84%EF%BC%81/">省选游记？省选游寄！</a>
          </li>
        
      </ul>
    </div>
  </div>

  
</aside>
        
      </div>
      <footer id="footer">
  
  <div class="outer">
    <div id="footer-info" class="inner">
      
      &copy; 2023 John Doe<br>
      Powered by <a href="https://hexo.io/" target="_blank">Hexo</a>
    </div>
  </div>
</footer>

    </div>
    <nav id="mobile-nav">
  
    <a href="/" class="mobile-nav-link">Home</a>
  
    <a href="/archives" class="mobile-nav-link">Archives</a>
  
</nav>
    


<script src="/js/jquery-3.6.4.min.js"></script>



  
<script src="/fancybox/jquery.fancybox.min.js"></script>




<script src="/js/script.js"></script>





  </div>
</body>
</html>